package com.eascs.workflow.common.entity.wf;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;
import java.io.Serializable;
import java.util.Date;
import java.util.List;

@Entity
@Table(name = "wf_process_task_node")
public class ProcessTaskNode implements Serializable {
	private static final long serialVersionUID = 1L;

	/** 提交 */
	public static final int NODE_STATUS_INIT = 0;
	/** 审核中 */
	public static final int NODE_STATUS_AUDITING = 1;
	/** 待审核 */
	public static final int NODE_STATUS_PENDING_AUDIT = 2;
	/** 审核通过 */
	public static final int NODE_STATUS_AUDIT_PASS = 3;
	/** 否决 */
	public static final int NODE_STATUS_REJECT = 4;
	/** 驳回 */
	public static final int NODE_STATUS_TURNED_DOWN = 5;
	/** 结束 */
	public static final int NODE_STATUS_END = 9;

	/** 任务节点ID */
	@Id
	@Column(name = "task_node_id")
	private String taskNodeId;

	/** 主流程ID */
	@Column(name = "task_id")
	private String taskId;

	/** 流程节点模板Id */
	@Column(name = "node_template_id")
	private String nodeTemplateId;

	/** 节点名称 */
	@Column(name = "node_name")
	private String nodeName;

	/** 节点编码 */
	@Column(name = "node_code")
	private String nodeCode;

	/** 节点序列 */
	@Column(name = "node_seq")
	private Integer nodeSeq;

	/** 节点的父节点 */
	@Column(name = "node_parent_id")
	private String nodeParentId;

	/** 节点状态: 1-提交,2-审核中,3-待审核,4-审核通过,5-驳回 */
	@Column(name = "node_status")
	private Integer nodeStatus;

	/** 节点类型 1-开始流程，2-直到流程，3-或型流程，4且型流程，9-完结流程 */
	@Column(name = "node_type")
	private String nodeType;

	/** 审核开始时间 */
	@Column(name = "auditor_start_date")
	private Date auditorStartDate;

	/** 审核结束时间 */
	@Column(name = "auditor_end_date")
	private Date auditorEndDate;

	/** 引用URL */
	@Column(name = "refer_url")
	private String referUrl;

	/** 节点动态表单ID */
	@Column(name = "form_id")
	private String formId;

	@Column(name = "role_no")
	private String roleNo;

	@Column(name = "remark")
	private String remark;

	private List<TaskNodeAuditor> auditors;

	/** 节点时效 */
	@Column(name = "time_effective")
	private Integer timeEffective;

	/** 节点超时时间 */
	@Column(name = "node_overtime")
	private Date nodeOvertime;

	/** 节点用时 */
	@Column(name = "used_time")
	private Float usedTime;

	// 是否发送邮件
	@Column(name = "is_send_email")
	private Integer isSendEmail;
	// 是否发送短信
	@Column(name = "is_send_sms")
	private Integer isSendSms;
	// 是否微信通知
	@Column(name = "is_send_wechat")
	private Integer isSendWechat;
	// 是否自动审核
	@Column(name = "is_auto_audit")
	private Integer isAutoAudit;
	//加签类型
	@Column(name = "sign_type")
	private String signType;

	public String getTaskNodeId() {
		return taskNodeId;
	}

	public void setTaskNodeId(String taskNodeId) {
		this.taskNodeId = taskNodeId;
	}

	public String getTaskId() {
		return taskId;
	}

	public void setTaskId(String taskId) {
		this.taskId = taskId;
	}

	public String getNodeTemplateId() {
		return nodeTemplateId;
	}

	public void setNodeTemplateId(String nodeTemplateId) {
		this.nodeTemplateId = nodeTemplateId;
	}

	public String getNodeName() {
		return nodeName;
	}

	public void setNodeName(String nodeName) {
		this.nodeName = nodeName;
	}

	public Integer getNodeStatus() {
		return nodeStatus;
	}

	public void setNodeStatus(Integer nodeStatus) {
		this.nodeStatus = nodeStatus;
	}

	public String getNodeType() {
		return nodeType;
	}

	public void setNodeType(String nodeType) {
		this.nodeType = nodeType;
	}

	public Date getAuditorStartDate() {
		return auditorStartDate;
	}

	public void setAuditorStartDate(Date auditorStartDate) {
		this.auditorStartDate = auditorStartDate;
	}

	public String getReferUrl() {
		return referUrl;
	}

	public void setReferUrl(String referUrl) {
		this.referUrl = referUrl;
	}

	public List<TaskNodeAuditor> getAuditors() {
		return auditors;
	}

	public void setAuditors(List<TaskNodeAuditor> auditors) {
		this.auditors = auditors;
	}

	public Date getAuditorEndDate() {
		return auditorEndDate;
	}

	public void setAuditorEndDate(Date auditorEndDate) {
		this.auditorEndDate = auditorEndDate;
	}

	public Integer getNodeSeq() {
		return nodeSeq;
	}

	public void setNodeSeq(Integer nodeSeq) {
		this.nodeSeq = nodeSeq;
	}

	public String getNodeParentId() {
		return nodeParentId;
	}

	public void setNodeParentId(String nodeParentId) {
		this.nodeParentId = nodeParentId;
	}

	public String getFormId() {
		return formId;
	}

	public void setFormId(String formId) {
		this.formId = formId;
	}

	public String getRoleNo() {
		return roleNo;
	}

	public void setRoleNo(String roleNo) {
		this.roleNo = roleNo;
	}

	public String getNodeCode() {
		return nodeCode;
	}

	public void setNodeCode(String nodeCode) {
		this.nodeCode = nodeCode;
	}

	public String getRemark() {
		return remark;
	}

	public void setRemark(String remark) {
		this.remark = remark;
	}

	public Integer getTimeEffective() {
		return timeEffective;
	}

	public void setTimeEffective(Integer timeEffective) {
		this.timeEffective = timeEffective;
	}

	public Date getNodeOvertime() {
		return nodeOvertime;
	}

	public void setNodeOvertime(Date nodeOvertime) {
		this.nodeOvertime = nodeOvertime;
	}

	public Float getUsedTime() {
		return usedTime;
	}

	public void setUsedTime(Float usedTime) {
		this.usedTime = usedTime;
	}
	
	public Integer getIsSendEmail() {
		return isSendEmail;
	}

	public void setIsSendEmail(Integer isSendEmail) {
		this.isSendEmail = isSendEmail;
	}

	public Integer getIsSendSms() {
		return isSendSms;
	}

	public void setIsSendSms(Integer isSendSms) {
		this.isSendSms = isSendSms;
	}

	public Integer getIsSendWechat() {
		return isSendWechat;
	}

	public void setIsSendWechat(Integer isSendWechat) {
		this.isSendWechat = isSendWechat;
	}

	public Integer getIsAutoAudit() {
		return isAutoAudit;
	}

	public void setIsAutoAudit(Integer isAutoAudit) {
		this.isAutoAudit = isAutoAudit;
	}
	
	public String getSignType() {
		return signType;
	}

	public void setSignType(String signType) {
		this.signType = signType;
	}

	@Override
	public String toString() {
		return "ProcessTaskNode [taskNodeId=" + taskNodeId + ", taskId=" + taskId + ", nodeTemplateId=" + nodeTemplateId + ", nodeName=" + nodeName + ", nodeCode=" + nodeCode + ", nodeSeq=" + nodeSeq + ", nodeParentId="
				+ nodeParentId + ", nodeStatus=" + nodeStatus + ", nodeType=" + nodeType + ", auditorStartDate=" + auditorStartDate + ", auditorEndDate=" + auditorEndDate + ", referUrl=" + referUrl + ", formId=" + formId
				+ ", roleNo=" + roleNo + ", remark=" + remark + ", auditors=" + auditors + ", timeEffective=" + timeEffective + ", nodeOvertime=" + nodeOvertime + ", usedTime=" + usedTime + ", calcOvertime=" + "]";
	}

}
